import request from '@/utils/request';

/**
 * 企业是否开启会话存档
 * @param data
 * @returns
 */
export function getHaveAvailable(data?: any) {
    return request({
        url: '/scrm-api/console/riskmonitoring/message/have-available',
        method: 'POST',
        data
    });
}

/**
 * 社群打卡-列表
 * @param data
 * @returns
 */
export function punchCardListApi(data?: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/list',
        method: 'POST',
        data
    });
}

/**
 * 社群打卡-新建
 * @param data
 * @returns
 */
export function punchCardCreate(data?: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/create',
        method: 'POST',
        data
    });
}

/**
 * 社群打卡-编辑
 * @param data
 * @returns
 */
export function punchCardEdit(data?: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/edit',
        method: 'POST',
        data
    });
}

/**
 * 社群打卡-详情
 * @param data
 * @returns
 */
export function punchCardDetail(data?: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/detail',
        method: 'POST',
        data
    });
}

/**
 * 社群打卡-删除
 * @param data
 * @returns
 */
export function punchCardDel(data?: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/del',
        method: 'POST',
        data
    });
}

/**
 * 社群打卡-结束
 * @param data
 * @returns
 */
export function punchCardOver(data?: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/over',
        method: 'POST',
        data
    });
}

/**
 * 社群打卡-获取打卡查询链接
 * @param data
 * @returns
 */
export function getUrlLink(data?: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/get-url-link',
        method: 'POST',
        data
    });
}

/**
 * 社群打卡-群聊是否开通会话存档
 * @param data
 * @returns
 */
export function openSessionList(data?: any) {
    return request({
        url: '/scrm-api/console/customer/group/open-session-list',
        method: 'POST',
        data
    });
}

/**
 * 社群打卡-小程序信息
 * @param data
 * @returns
 */
export function getMpBaseInfo(data?: any) {
    return request({
        url: '/scrm-api/console/miniapp/base-info',
        method: 'POST',
        data
    });
}

/**
 * --------------数据--------------------
 * @param params
 * @returns {PromiseLike<T | never> | Promise<T | never> | *}
 */
// 参与活动基础信息
export function getBaseInfo(data: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/data/base-info',
        method: 'POST',
        data
    });
}

//参与明细
export function joinList(data: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/data/join-list',
        method: 'POST',
        data
    });
}

//打卡用户明细
export function punchCardList(data: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/data/punch-card-list',
        method: 'POST',
        data
    });
}

//打卡记录
export function punchCardRecord(data: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/data/punch-card-record',
        method: 'POST',
        data
    });
}

//奖励发放记录
export function rewardIntegralList(data: any) {
    return request({
        url: '/scrm-api/console/market/punch-card/data/reward-integral-list',
        method: 'POST',
        data
    });
}
